@echo off

if defined TAB_HOME goto ExecuteMail
echo The "TAB_HOME" environment variable must be set to the TABMAIL Install directory
goto :EOF

:ExecuteMail
set MAIL_LIB="%TAB_HOME%"\lib
set MAIL_CLASSPATH=%TAB_HOME%\tabMail.jar;%MAIL_LIB%\activation.jar;%MAIL_LIB%\config.jar;%MAIL_LIB%\dsn.jar;%MAIL_LIB%\imap.jar;%MAIL_LIB%\mail.jar;%MAIL_LIB%\mailapi.jar;%MAIL_LIB%\pop3.jar;%MAIL_LIB%\recipients.jar;%MAIL_LIB%\smtp.jar;%MAIL_LIB%\jsr173_api.jar;%MAIL_LIB%\resolver.jar;%MAIL_LIB%\xbean.jar;%MAIL_LIB%\xbean_xpath.jar;%MAIL_LIB%\xmlpublic.jar;

java.exe -Xms256M -Xmx512M -cp "%MAIL_CLASSPATH%" org/mymail/mail/ReadMail
java.exe -Xms256M -Xmx512M -cp "%MAIL_CLASSPATH%" org/mymail/mail/Send %* 
